package trace

import "time"

const (
	WriteRequestError = iota
	ConnectionServerError
	FindDnsDoneError
)

type UsedTime struct {
	TraceErrorType          int `json:"traceErrorType"`
	FetchConnStart          time.Time
	FetchConnUsedTime       int64 `json:"fetchConnUsedTime"`
	CreateConnStart         time.Time
	CreateConnEnd           time.Time
	CreateConnUsedTime      int64 `json:"createConnUsedTime"`
	FetchResponseStart      time.Time
	FetchResponseUsedTime   int64 `json:"fetchResponseUsedTime"`
	FindDnsStart            time.Time
	FindDnsUsedTime         int64 `json:"findDnsUsedTime"`
	TlsHandshakeStart       time.Time
	TlsHandshakeUsedTime    int64 `json:"tlsHandshakeUsedTime"`
	UploadNumber            int   `json:"uploadNumber"`
	SendHeaderUsedTime      int64 `json:"sendHeaderUsedTime"`
	SendHeaderEnd           time.Time
	Wait100ContinueUsedTime int64     `json:"wait100ContinueUsedTime"`
	Wait100ContinueEnd      time.Time `json:"wait100ContinueEnd"`
	SendRequestUsedTime     int64     `json:"sendRequestUsedTime"`
	SendRequestEnd          time.Time
	WaitResponseUsedTime    int64 `json:"waitResponseUsedTime"`
}
